
#pragma once

#include "GameStd.h"
#include "State.h"
#include "IInputListener.h"
#include <SdkCameraMan.h>

//The total number of characters used in the text file 
//to write to the bitmap AND constants of the rows and cols
const int ALIGNMENT_LAYOUT_ROWS = 5;
const int ALIGNMENT_LAYOUT_COLS = 5;
const int ALIGNMENT_LAYOUT_SIZE = ALIGNMENT_LAYOUT_ROWS * ALIGNMENT_LAYOUT_COLS;

class AlignmentState : public State
{
public:

	AlignmentState();
	~AlignmentState(){};

	void Enter(int prevState);
	void Pause();
	void Unpause();
	void Execute();
	void Exit();
	bool IsRunning();

protected:
	void OnKeyDown(const OIS::KeyCode& key);
	void OnKeyUp(const OIS::KeyCode& key);
	void OnKeyHeld(const OIS::KeyCode& key);

	void OnMouseDown(const OIS::MouseState& mouse, const OIS::MouseButtonID &id);
	void OnMouseUp(const OIS::MouseState& mouse, const OIS::MouseButtonID &id);
	void OnMouseHeld(const OIS::MouseState& mouse, const OIS::MouseButtonID &id);
	void OnMouseMoved(const OIS::MouseState& mouse);
	
	void Initialize();
	void UpdateStarted(const Ogre::FrameEvent& gameTime);
	void UpdateEnded(const Ogre::FrameEvent& gameTime);
	void Cleanup();

private:

	void createScene();

	OgreBites::SdkCameraMan* mCameraMan;
	
	//Nice array to hold values read in from Layout_OffsetPursuit.txt
	bool bitmap[ALIGNMENT_LAYOUT_SIZE];

	//Indicate if objects in the state should be updated
	bool running;
};